function check() {
    var username = $("#username").val();
    var password = $("#password").val();
    if (username === "" || password === "") {
        alert("Username or password cannot be empty");
        return false;
    }
    return true;
}

function register() {
    location.href = "${pageContext.request.contextPath}/register.action";
}